package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SVipDao;
import com.xyz.domain.table.SVip;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SVipLogic {

    @Autowired
    private SVipDao sVipDao;

    public SVip add(SVip sVip){
        return sVipDao.insert(sVip);
    }

    public Integer update(SVip sVip){
        return sVipDao.update(sVip);
    }

    public List<SVip> list(SVip sVip, String orderBy){
        return sVipDao.selectList(sVip, orderBy);
    }

    public Integer delete(Integer key){
        return sVipDao.delete(key);
    }

    public PageResponseModel<SVip> pageInfo(SVip sVip, String orderBy, Integer pageNo, Integer pageSize){
        return sVipDao.selectByPageNo(sVip, orderBy, pageNo, pageSize);
    }

}